<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>link管理</title>

<link href="${ctx }/favicon.ico" rel="shortcut icon">

<link rel="stylesheet" type="text/css" href="${ctx }/static/jquery-easyui-1.5.1/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctx }/static/jquery-easyui-1.5.1/themes/icon.css">
<script type="text/javascript" src="${ctx }/static/jquery-easyui-1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="${ctx }/static/jquery-easyui-1.5.1/jquery.easyui.min.js"></script>

<script type="text/javascript" src="${ctx }/static/js/ajaxfileupload.js"></script>
<script type="text/javascript" src="${ctx }/static/js/link.js"></script>

<style type="text/css">
	a{text-decoration: blink;color: #3925AB;}
	#recycleWindow{z-index: 9999;position: absolute;background-color: white;top: 50px;display:none;
    left: 30%; border: 1px solid #b7d2ff;border-radius: 10px;}
	.r_td{width: 250px;height: 60px;line-height: 30px;text-align: center;border: 1px solid #EEEEEE;border-radius: 10px;}
	.r_td:HOVER{
		-webkit-box-shadow:0 0 15px #0E2D5F;  
		-moz-box-shadow:0 0 15px #0E2D5F;  
		box-shadow:0 0 15px #0E2D5F; 
	}
	.r_td_but{font-size: 10px;position: relative;top: 0px;left: 90px;cursor: pointer;color: red;}
	.box-shadow-3{  
		-webkit-box-shadow:0 0 10px #b9c1ce;  
		-moz-box-shadow:0 0 10px #b9c1ce;  
		box-shadow:0 0 10px #b9c1ce;  
	}  
</style>
<script type="text/javascript">
	var ctx = "${ctx }";
</script>
</head>
<body>
	
	
	
	<!-- 回收站 -->
	<div id="recycleWindow" class="box-shadow-3">
		<div style="height: 30px;line-height: 30px;width: 70px;text-align: center;float: left;">回收站</div>
		<div style="height: 30px;line-height: 30px;width: 70px;text-align: center;float: right;">
			<span style="background-color: #EEEEEE;" onclick="$('#recycleWindow').hide();">关闭</span>
		</div>
		<br><br>
		<hr style="margin: 0px;">
		<table cellspacing="10" id="recycleTable" style="font-size: 12px;">
			<tr>
				<td class="r_td box-shadow-3">
					AAAAAA<br/>
					aaa
					<span ><a class="r_td_but" href="">恢复</a></span>
				</td>
				<td class="r_td box-shadow-3">
					BBBBB<br/>
					bbb
					<span ><a class="r_td_but" href="">恢复</a></span>
				</td>
			</tr>		
		</table>
	</div>
	
	<!-- link操作 -->
	<div id="linkWindow">
		<div style="padding:10px 60px 20px 60px">
	    <form id="linkForm" class="easyui-form" method="post" enctype="multipart/form-data" data-options="novalidate:true">
	    	<table cellpadding="5">
	    		<tr>
	    			<td>名称:</td>
	    			<td>
	    				<input type="hidden" id="id" name="id"/>
	    				<input type="hidden" id="isRemove" name="isRemove"/>
	    				<input class="easyui-textbox" type="text" name="name" id="name" data-options="required:true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>类型:</td>
	    			<td>
	    				<select class="easyui-combobox" name="tid" id="tid" style="width: 100px;">
		    				<c:forEach var="t" items="${requestScope.types }">
		    					<option value="${t.id }" >${t.name }</option>
		    				</c:forEach>
	    				</select>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>icon:</td>
	    			<td>
	    				<input class="easyui-filebox" name="iconFile" id="icon" multiple="multiple" data-options="prompt:'选择图标'"/><br/>
	    				<table id="showIcon"style="border: 1px solid #b7d2ff;margin-top: 3px;">
	    					<tr>
								<td style="width: 45px;text-align: center;">预览</td>
								<td><img src="${ctx }/static/img/default.jpg" id="img0" style="border: 1px solid #b7d2ff;width: 100px;height: 100px;"></td>
	    					</tr>
	    				</table>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>url:</td>
	    			<td>
	    				<input class="easyui-textbox" type="text" name="url" id="url" data-options="required:true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>描述:</td>
	    			<td>
	    				<input class="easyui-textbox" name="decription" id="decription" data-options="multiline:true" style="height:60px"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>账号:</td>
	    			<td>
	    				<input class="easyui-textbox" name="userName" id="userName" data-options="required:true"/>
	    			</td>
	    		</tr>
	    		<tr>
	    			<td>密码:</td>
	    			<td>
	    				<input class="easyui-textbox" name="password" id="password" data-options="required:true"/>
	    			</td>
	    		</tr>
	    	</table>
	    </form>
	    
	    <div style="text-align:center;padding:5px">
	    	<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" id="addBut" onclick="save();">保存</a> 
	    	<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" id="updateBut" onclick="update();">修改</a> 
	        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="cancel();">关闭</a> 
	    </div>
	    
	    </div>
	</div>
	
    <div class="datagrid-toolbar">
	    <div style="padding: 0px; height: auto;">
	    	&nbsp;
	        
	        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" 
	        	onclick="add();">增加</a> 

	        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" 
	        	onclick="removeLink();">删除</a>
	        	
	        <span style="color: gray;">&nbsp;|&nbsp;</span>
	        
	        <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" 
	        	onclick="reload();">刷新</a>
			
			<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-hsz-16-16',plain:true"  
				onclick="recycle();">回收站</a>
				
			<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" 
	        	onclick="window.location.href='${ctx }/bookmark.html'">导出书签</a>
	    </div>
	</div>
	<table id="xx" ></table>
</body>
</html>